#define BOOST_TEST_MODULE MySuiteTest
#include <boost/test/included/unit_test.hpp>

#include <iostream>

#include "frreport_comm.h"
#include "frct_comm.h"
#include "frservice_comm.h"
#include "config.h"
#include "frmem_stat.h"
#include "frmem.h"
#include "pop3.h"
#include "pop3.c"

//__ending_judge
/* test_suite1 start */
BOOST_AUTO_TEST_SUITE(test_suite1)
// test_case1 in test_suite1
BOOST_AUTO_TEST_CASE(test_case1)
{
    int i_ret = 0;
	i_ret = __ending_judge((char *)"", 0);
	BOOST_REQUIRE_EQUAL(i_ret, 0);
}
// test_case2 in test_suite1
BOOST_AUTO_TEST_CASE(test_case2)
{
    int i_ret = 0;
	i_ret = __ending_judge((char *)"+OK Name is a valid mailbox\r\n", 29);
	BOOST_REQUIRE_EQUAL(i_ret, 1);
}
// test_case3 in test_suite1
BOOST_AUTO_TEST_CASE(test_case3)
{
    int i_ret = 0;
	i_ret = __ending_judge((char *)"+OK scan listing follows\r\n", 38);
	BOOST_REQUIRE_EQUAL(i_ret, 0);
	//BOOST_FAIL("Should never reach this line");
}
// test_case4 in test_suite1
BOOST_AUTO_TEST_CASE(test_case4)
{
    int i_ret = 0;
	i_ret = __ending_judge((char *)"1 56519\r\n.\r\n", 38);
	BOOST_REQUIRE_EQUAL(i_ret, 0);
}
// test_case5 in test_suite1
BOOST_AUTO_TEST_CASE(test_case5)
{
    int i_ret = 0;
	i_ret = __ending_judge((char *)"\r\n\r\n.\r\n", 38);
	BOOST_REQUIRE_EQUAL(i_ret, 1);
}
BOOST_AUTO_TEST_SUITE_END()
/* test_suite1 end */